<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<!--[if lt IE 9]>
    <script src="jquery-1.9.0.js"></script>
<![endif]-->
		<!--[if gte IE 9]><!-->
		<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
		<!--<![endif]-->
		<script type="text/javascript">
			$(document).ready(function() {
				$("p").click(function() {
					if($("p").parent().is("div")) {
						alert("p 的父元素是 div");
					}
				});
			});
		</script>
	</head>

	<body>

		<div>
			<p>点我查看父元素是否是 div。</p>
		</div>

	</body>

</html>